#ifndef MAINWIDGET_H
#define MAINWIDGET_H
#include<QLabel>
#include <QWidget>
#include<QPushbutton>
#include<QLineEdit>

class MainWidget : public QWidget
{
    Q_OBJECT


private:
    static MainWidget* instance;
    QWidget*left;
    QWidget *mid;
    QWidget *right;
    //搜索框
    QLineEdit*searchLine;
    typedef enum
    {
        SESSION_LIST,
        FRIEDN_LIST,
        APPLY_LIST
    }buttonClicked;
    buttonClicked selectStatus;
    QPushButton *avatorbutn;
    QPushButton*sessionbutn;
    QPushButton *friendbutn;
    QPushButton *applybutn;
    QPushButton *plusSignal;
    MainWidget(QWidget *parent = nullptr);
public:

    ~MainWidget();
    static MainWidget*getInstance();

    void initMainWindow();
    void  initLeftWindow();
    void  initMidWindow();
    void  initRightWindow();


    void initSignalAndSlot();


    //左边栏的槽函数
    void handlerAvator();
    void handlerSession();
    void handlerFriend();
    void handlerApply();

private:
    //右侧界面回话详情的点击按钮
    QPushButton *pointBtn;

};
#endif // MAINWIDGET_H
